1. Field of the Invention
The present invention relates generally to a method for converting different data formats, such as data formats used in programs that are convertible into executable object code as the result of a translation, or compiling operation performed by a translation, or compiling, program, wherein the different data types are converted from one format to another format.
2. Description of the Related Art
Contemporary communication systems often use multiple processors. A plurality of processors implement the control of internal system events in such multi-processors systems. Typically, such communication systems are heterogenous systems, which means that processors from various manufacturers are utilized in the communication system. However, these processors work according to manufacturer-specific standards. For example, data from individual processors are deposited in the respectively allocated memory in different formats. As long as programs that are usually allocated in one processor during their execution read data from the corresponding memory, process that data and write the data back into the corresponding memory, there is no limitations imposed on the operation of the system since the same data format is always used. Problems arise, however, when messages or data are exchanged between processors or the programs running on them, since the data must possibly be matched to the different data formats.
For example, data processed on processors of the Motorola family are stored by these processors in an LSB.sub.-- HI format (least significant byte at the highest address), also referred to as Big Endian Format. By contrast, data that are processed on the processors of the Intel family are stored by these processors in an LSB.sub.-- LO format (least significant byte at the lowest address), also referred to as Little Endian Format. In the case of data exchange between these two processor types, the data must be converted in an appropriate way.
To solve the problems of different data formats in process communications in heterogeneous systems, a specific transfer format has been defined for the exchange of messages and data. This means that the processor specific format is converted to a defined transmission format that is used only for the purpose of exchanging messages between processors before each message is exchanged. When the message has arrived at the destination processor, the data in the transmission format is reconverted into the processor specific format which is used at the receiving end. To accomplish this, a library containing the conversion functions for the basic data types of the respective programming languages is provided, according to the prior art. The transmission formats for the exchange of messages between processors can be determined with the assistance of these format conversions in the library.
In various programming languages, such as the programming language CHILL, the data formats of the data which is being stored can be defined by the developer of the application software. These conditions are disclosed in the publication "Language Solution for Mixed Data Formats", by Mark Clark and G. Walter, Fourth CHILL Conference, Munich, Sep. 29 through Oct. 2, 1986. The problems with such a procedure is that the programs which communicate with one another by exchanging messages are themselves responsible for the conversion of the exchanged messages between the processor specific data format and the transfer format. However, all required format conversions must be explicitly programmed into the coding of the each program by the developer of that application software. In particular, conversions of complex data types, such as structures and arrays, must be explicitly imaged into the conversions of the basic data types assisted by the library functions. This necessarily involves an increase in developmental for the program outlay as well as providing an additional source of error. Given a strict application of this technique, problems exist in that the conversion from the processor specific data format of the source processor and another conversion from the transfer format into the processor specific data format for the destination processor also are required even when sending messages between the programs that run on processors which have the same data format. This has a negative affect on the system dynamics, to say the least.